lib/upgrade.sh